abstract class Woker {
    int id;
    String name;
    int money;

    public Woker(int id,String name,int money){
        this.id = id;
        this.name = name;
        this.money = money;
    }

    void show(){
        System.out.println("id:"+id+" 姓名:"+name+" 工资:"+money);
    }

    public abstract void post();
}




class Manager extends Woker{
    int bonus;
    public Manager(int id,String name,int money,int bonus){
        super(id,name,money);
        if (bonus>10000 || bonus<0){
            System.out.println("您输入的职务奖金数目有错误");
            System.exit(0);
        }
        else this.bonus = bonus;

    }

    public void post(){
        System.out.println("您的工作是经理");
        show();
        System.out.println("您的职务奖金是:"+bonus);

    }
}




class Tozi extends Woker{
    String yuyan;
    public Tozi(int id,String name,int money,String yuyan){
        super(id, name, money);
        if (yuyan.equals("java")||yuyan.equals("c语音")||yuyan.equals("c++")||yuyan.equals("pothom")){
        this.yuyan = yuyan;
    }
        else System.out.println("您所输入的语言类型有误");
        System.exit(0);}


    public void post(){
        System.out.println("您的工作是会秃头的程序员");
        show();
        System.out.println("您所使用的语言为"+yuyan);

    }
}


class Ayi extends Woker{
    int age;
    public Ayi(int id,String name,int money,int age){
        super(id, name, money);
        if (age<30 || age>60){
            System.out.println("你这个年龄来做保洁阿姨？");
            System.exit(0);
        }
        else this.age = age;
    }

    public void post(){
        System.out.println("你的工作是打扫卫生的保洁阿姨");
        show();
        System.out.println("你的年龄为"+age);
    }
}



